package com.project.frba.bi.dashboard;

public class DashboardQueryBuilder {
	
	public static String insertDualDashboardQuery(){
		return "INSERT INTO dual_dashboard(name, user) VALUES (?, ?);";
	}
	
	public static String insertQuadDashboardQuery(){
		return "INSERT INTO quad_dashboard(name, user) VALUES (?, ?);";
	}
	
	public static String getAllDualDashboardsFromUser(){
		return "SELECT * FROM dual_dashboard ddb WHERE ddb.user = ?" ;
	}
	
	public static String getAllQuadDashboardsFromUser(){
		return "SELECT * FROM quad_dashboard qdb WHERE qdb.user = ?";
	}
	
	public static String removeDualDashboardQuery(){
		return "DELETE FROM dual_dashboard WHERE id = ?";
	}
	
	public static String removeQuadDashboardQuery(){
		return "DELETE FROM quad_dashboard WHERE id = ?";
	}
	
	public static String updateDualDashboardFieldQuery(String field){
		return "UPDATE dual_dashboard ddb SET ddb." + field + " = ? WHERE ddb.id = ?";
	}
	
	public static String updateQuadDashboardFieldQuery(String field){
		return "UPDATE quad_dashboard qdb SET qdb." + field + " = ? WHERE qdb.id = ?";
	}
	
	public static String updateDualDashboardQuery(){
		return "UPDATE dual_dashboard ddb SET ddb.name = ?, ddb.first = ?, ddb.second = ? WHERE ddb.id = ?";
	}
	
	public static String updateQuadDashboardQuery(){
		return "UPDATE quad_dashboard qdb SET qdb.name = ?, qdb.first = ?, qdb.second = ?, qdb.third = ?, qdb.fourth = ?  WHERE qdb.id = ?";
	}
	
	public static String findDualDashboardById(){
		return "SELECT * FROM dual_dashboard ddb WHERE ddb.id = ?";
	}
	
	public static String findQuadDashboardById(){
		return "SELECT * FROM quad_dashboard qdb WHERE qdb.id = ?";
	}

}
